#!/usr/bin/env julia

"""
Minimal test to check PDEJulia.jl structure and basic functionality
"""

using Pkg
Pkg.activate(".")

println("=== PDEJulia.jl Minimal Test ===")

# Test 1: Check if main module loads
println("\n1. Testing main module loading...")
try
    push!(LOAD_PATH, pwd())
    push!(LOAD_PATH, "src")
    
    # Try basic Julia dependencies
    using LinearAlgebra
    using SparseArrays
    println("✓ Basic Julia dependencies loaded")
    
    # Check if src directory structure exists
    if isfile("src/PDEJulia.jl")
        println("✓ Main source file exists")
        
        # Try to include the main file to see what's missing
        try
            include("src/PDEJulia.jl")
            println("✓ Main module loaded successfully")
        catch e
            println("✗ Error loading main module: $e")
            
            # Try to load individual submodules
            println("\n2. Testing individual submodules...")
            
            submodules = ["grids", "fields", "pdes", "solvers", "storage", "trackers", "visualization", "tools"]
            
            for submod in submodules
                submod_path = "src/$submod/$submod.jl"
                if isfile(submod_path)
                    println("  ✓ Found: $submod_path")
                else
                    println("  ✗ Missing: $submod_path")
                end
            end
        end
    else
        println("✗ Main source file missing")
    end
    
catch e
    println("✗ Error with dependencies: $e")
end

println("\n=== Test Complete ===")